#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author   : Uyynot
# @Email    : uyynot@qq.com
# @Time     : 2025/7/18 16:05
# @File     : h.py
# @Project  : demoProject
# @Desc     :
import os
from typing import Annotated

from fastapi import FastAPI, Header

app = FastAPI()


@app.get("/items/")
async def read_items(x_token: Annotated[str | None, Header()] = None):
    print(x_token)
    print(dict(os.environ))
    return {"X-Token values": x_token}


if __name__ == '__main__':
    import uvicorn

    uvicorn.run(app, host="127.0.0.1", port=8000)